import Layout from '@/page/index/index.vue'

export default [
  {
    path: '/',
    name: 'home',
    component: Layout,
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: '首页',
        meta: {
          auth: false,
          title: '首页',
          keepAlive: false
        },
        component: () => import('@/views/HomeView.vue')
      },
      {
        path: '/about',
        name: 'about',
        meta: {
          auth: false,
          title: '关于',
          keepAlive: false
        },
        component: () => import('@/views/AboutView.vue')
      },
      {
        path: '/zanzhu',
        name: 'zanzhu',
        meta: {
          auth: false,
          title: '赞助',
          keepAlive: false
        },
        component: () => import('@/views/ZanzhuView.vue')
      },
      {
        path: '/register',
        meta: {
          auth: false,
          title: '注册',
          keepAlive: false
        },
        component: () => import('@/views/register/index.vue')
      },
      {
        path: '/login',
        meta: {
          auth: false,
          title: '登录',
          keepAlive: false
        },
        component: () => import('@/views/login/index.vue')
      }
    ]
  },

  {
    path: '/404',
    meta: {
      auth: false,
      title: '404',
      keepAlive: false
    },
    component: () => import('@/views/error/404.vue')
  },
  // 404 页面必须放在最后面
  { path: '*', redirect: '/404' }
]
